/**
 * 
 */
package com.geekteam.geometrychess.room.entity;

import com.smartfoxserver.v2.entities.data.ISFSObject;
import com.smartfoxserver.v2.entities.data.SFSObject;

/**
 * @author MtRol
 *
 */
public class Player {
	public static final int TYPE_ANONYMOUS = 0;
	public static final int TYPE_USER = 1;
	public static final int TYPE_MOD = 2;
	public static final int TYPE_ADMIN = 3;
	
	public String mUserName;
	public String mName;
	public String mEmail;
	public String mAvatar;
	public int mGender;
	public long mBirthDay;
	public double mExp;
	public double mMoney;
	public long mWin;
	public long mTotal;
	public int mLevel;
	public int mType;
	public long mId;
	public int mSfsId;
	
	public Player(){
		
	}
	
	public ISFSObject toSFSObject(){
		ISFSObject object = new SFSObject();
		object.putUtfString("userName", mUserName);
		object.putUtfString("name", mName);
		object.putUtfString("email", mEmail);
		object.putUtfString("avatar", mAvatar);
		object.putLong("birthday", mBirthDay);
		object.putInt("gender", mGender);
		object.putDouble("exp", mExp);
		object.putDouble("money", mMoney);
		object.putLong("win", mWin);
		object.putLong("total", mTotal);
		object.putInt("level", mLevel);
		object.putLong("id", mId);
		return object;
	}
}
